import http from '@/utils/request'

import type { loginParams } from './index.type'

import type { AxiosResponse } from 'axios'


type loginApiType = <T>(data: loginParams) => Promise<AxiosResponse<T, any>>


export const loginApi: loginApiType = (data) => {
  return http.post('/user/pub/login', data)
}



export const getAll = () => {
  return http.post('/admin/system/menu/sys/getAll')
}

//   用户信息  菜单  权限  角色
export const getMenu = () => {
  return http.get('/user/kh/getMenu')
}
